import Cookie from 'js-cookie'
import ajax from './public'
import global from '../../../config/global'// 引用全局变量文件
// console.log(global.CookieExpired);

export function getInfo () {
  ajax.doAction({
    url: '/user',
    type: 'POST',
    successCallback: (data) => {
      // console.log(data);
      Cookie.set('userInfo', JSON.stringify(data.data), {expires: global.CookieExpired})
    },
    errorCallback: (data) => {
      console.log(data)
    }
  })
}
